package com.zyz.K_集合.Map实现类四HashTable;

import java.util.Hashtable;
import java.util.Set;

/**
 * @author: vick
 * @Date: 2025/3/31
 * @Description:
 * @version: 1.0
 */
public class Demo1 {
    public static void main(String[] args) {
        Hashtable hashtable = new Hashtable();

        hashtable.put("Vick", 85);
        hashtable.put("Alice", 90);
        hashtable.put("Bob", 90);
        //抛出空指针异常
        hashtable.put(null, null);

        Object object = hashtable.get("Vick");
        System.out.println(object);

        Set set = hashtable.entrySet();
        for (Object obj : set) {
            System.out.println(obj);
        }
    }
}
